﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using DTO;
using DAO;
using System.Data;

namespace BUS
{
    public class MonAnBUS
    {
        public DataTable LoadDS()
        {
            MonAnDAO ma = new MonAnDAO();
            return ma.LoadDS();
        }

        public DataTable LoadMonTheoMa(int maMon)
        {
            MonAnDAO ma = new MonAnDAO();
            return ma.LoadMonTheoMa(maMon);
        }

        public DataTable LoadMenu()
        {
            MonAnDAO ma = new MonAnDAO();
            return ma.LoadMenu();
        }

        public Boolean ThemMon(MonAnDTO maDTO)
        {
            MonAnDAO ma = new MonAnDAO();
            return ma.ThemMon(maDTO);
        }

        public Boolean KiemTraTrungMon(string tenmon)
        {
            MonAnDAO ma = new MonAnDAO();
            return ma.KiemTraTrungMon(tenmon);
        }

        public Boolean XoaMon(int maMon)
        {
            MonAnDAO ma = new MonAnDAO();
            return ma.XoaMon(maMon);
        }

        public Boolean CapNhat(MonAnDTO maDTO)
        {
            MonAnDAO ma = new MonAnDAO();
            return ma.CapNhat(maDTO);
        }

        public Boolean CapNhatMonTrung(string tenmon, int Loai, float gia)
        {
            MonAnDAO ma = new MonAnDAO();
            return ma.CapNhatMonTrung(tenmon, Loai, gia);
        }
    }
}
